package cn.demo.service1.client;

//import org.springframework.cloud.netflix.feign.FeignClient;
//import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import cn.demo.User;
import cn.demo.service1.client.fallback.factory.Service0FallbackFactory;

@FeignClient(name = "service0", fallbackFactory = Service0FallbackFactory.class)
public interface Service0Client {

	@RequestMapping(method = RequestMethod.GET, path = "user/{userId}/{sleepSec}")
	String test(@PathVariable("userId") String userId,
			@PathVariable("sleepSec") int sleepSec);

	@RequestMapping(method = RequestMethod.GET, path = "user")
	String user(User user);
}
